cmake_minimum_required(VERSION 3.8)
project(fruit_cam)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(usb_cam REQUIRED)

# 添加帧率监控节点
add_executable(framerate_monitor src/framerate_monitor.cpp)
ament_target_dependencies(framerate_monitor rclcpp sensor_msgs)

# 安装可执行文件
install(TARGETS
  framerate_monitor
  DESTINATION lib/${PROJECT_NAME}
)

# 安装启动和配置文件
install(DIRECTORY
  launch
  config
  DESTINATION share/${PROJECT_NAME}/
)

ament_package()